UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L0FUusvIUbGQsMxIfkHQYFyVN6o8EUCv9ZlVE87Md5U='
WHERE
key_id = '43bc6e3f08ef9e83eb023e83b5b9058573263f0add506c970c6b43c56f5220b8'
AND (
token = 'L0FUusvIUbGQsMxIfkHQYFyVN6o8EUCv9ZlVE87Md5U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)