UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ELUCq2bKwQt4LmXqMXYbbqZHOXc05ZSy7Vo2qaCIy4U='
WHERE
key_id = 'd930128fe7a2428f3b3739747e26d34442d7e53d7aef3513fbfdc681102b49c2'
AND (
token = 'ELUCq2bKwQt4LmXqMXYbbqZHOXc05ZSy7Vo2qaCIy4U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)