UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LEia4eT++Q/uGJWipjQzBx4owLTMr3n6WXgoXuHuitc='
WHERE
key_id = '43818c7a93a3af09102c536949e7bc76a0d689bc8b83c7587c486149448770e5'
AND (
token = 'LEia4eT++Q/uGJWipjQzBx4owLTMr3n6WXgoXuHuitc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)