UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wtLUidJX66nNJ8h7HNIqkvhEJO8PHNhrFD3C79UCLmU='
WHERE
key_id = '93603ea104abf6608448cca3edb4d215da5e6744587d846379f89c59c4b05cd7'
AND (
token = 'wtLUidJX66nNJ8h7HNIqkvhEJO8PHNhrFD3C79UCLmU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)