UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bCzpgsCTPNSEhbq8UTelv6QUOlkdNzuZ/zFWSaRQB/c='
WHERE
key_id = '5e08f0023b07177949500e40f6d4914ba0bf66c61d0cd2da707a3f421b47e7aa'
AND (
token = 'bCzpgsCTPNSEhbq8UTelv6QUOlkdNzuZ/zFWSaRQB/c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)