UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2Gwon9Ztuo1FnRcSQt5ozhF1t87WbYOvn3PZkme7hNE='
WHERE
key_id = '6bc2e4cc4080bad04515c27f66e24b873870205ec34a55712e66f05fb69b0570'
AND (
token = '2Gwon9Ztuo1FnRcSQt5ozhF1t87WbYOvn3PZkme7hNE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)