UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3bp7tWXsVCJk/p0cGQdeq4FJs+gtAV00LBOddZZnJLY='
WHERE
key_id = '4498690555f1c815271ef0363b5c34247b14df240b8f52d3a8d9eedc52ec72d3'
AND (
token = '3bp7tWXsVCJk/p0cGQdeq4FJs+gtAV00LBOddZZnJLY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)