UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jPEODH6+hnrHiNiEH/UGLyO1dZj/x22Utt8m3NJOoKc='
WHERE
key_id = '4219045cb607af769f5160568d648c2e43dc2dd5afa8da6216d08be77b4c2a29'
AND (
token = 'jPEODH6+hnrHiNiEH/UGLyO1dZj/x22Utt8m3NJOoKc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)