UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GoCFNb/gfo5wmK9pbSzpCbQ0kEmNG3LXzJT+vqv6QdA='
WHERE
key_id = 'ccdc6c970bf01d3e1a3ae6baf4ae5214239a59ee3ac9dcd39d72c4139153fabd'
AND (
token = 'GoCFNb/gfo5wmK9pbSzpCbQ0kEmNG3LXzJT+vqv6QdA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)