UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'S2MgkJS7bg4fTZ2TGDe/5nA7RHwv35cyOncYh4bbEKA='
WHERE
key_id = '2030f5b914b9a392baa9babfdab038306b6238e88a803920c12a7cecbd91f3f0'
AND (
token = 'S2MgkJS7bg4fTZ2TGDe/5nA7RHwv35cyOncYh4bbEKA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)