UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TLDEfrvHFZRrbuYLraScwDz/k1YExVF1rVJigsGzyQ0='
WHERE
key_id = '76dd6df9fe81886ebad66e450834ae0a593215eb9fb75ebb4481ab91d0c92e43'
AND (
token = 'TLDEfrvHFZRrbuYLraScwDz/k1YExVF1rVJigsGzyQ0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)