UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iWoaJ/KEJjYJ0Z/ut+bA6h4H2TFxCa7Oodm0WNEKv2g='
WHERE
key_id = '07eceeeba11bb48647a9757f97665d8bbff020597bb64ed8db6767b53c8c15a8'
AND (
token = 'iWoaJ/KEJjYJ0Z/ut+bA6h4H2TFxCa7Oodm0WNEKv2g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)