UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ss5/jzYW7/OQdAcM9NFwaOPmbOeEmGH9CiymXltWxts='
WHERE
key_id = '1adadb8c5a7523517c305e772b4375da57cdda75a607b9f08e0036dd1268606e'
AND (
token = 'ss5/jzYW7/OQdAcM9NFwaOPmbOeEmGH9CiymXltWxts='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)