UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Gjvz3FJ3GtB6GqXI5fI1mvfcr+LdlbwGJKIx0f34AvA='
WHERE
key_id = '86f3fe8d2a7ec2c7c410d4e30838743342d050736e9306d41db412fb84f8918b'
AND (
token = 'Gjvz3FJ3GtB6GqXI5fI1mvfcr+LdlbwGJKIx0f34AvA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)