UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V7Mvg/493jDMNrV9AfcKuGEo/M4P7vknFOQyssXcq38='
WHERE
key_id = '58c5a8253503781cddaae9093b2d28471c69dd62b5b3cfedc681c0d7a011495a'
AND (
token = 'V7Mvg/493jDMNrV9AfcKuGEo/M4P7vknFOQyssXcq38='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)