UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MDbtIDFg+PFl91TD0hne9glZJGfLwRz+Qi/QJDu6wZI='
WHERE
key_id = '53beee86e60530e3a58f562c3b1ef1f009ea083e4d21713af8580397dd856591'
AND (
token = 'MDbtIDFg+PFl91TD0hne9glZJGfLwRz+Qi/QJDu6wZI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)