UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qGLRqi4VLDbCK5RZAKj+IKHBix/nEF+qRUuKAMRiqIE='
WHERE
key_id = '0a4139ff1fba1a96ec97bc913ed46d134b7cb921a1e8aebe44169c1e9c231613'
AND (
token = 'qGLRqi4VLDbCK5RZAKj+IKHBix/nEF+qRUuKAMRiqIE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)