UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qqbfVOYb5eqZehUy6v99lxRlqbxksCPLmVznETdeaxU='
WHERE
key_id = '55069890d4c30efda42cf4c589c08cee4b00bb0a07a29ca22affba53dfd6a6ee'
AND (
token = 'qqbfVOYb5eqZehUy6v99lxRlqbxksCPLmVznETdeaxU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)