UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2I9BfMCod18dUKgZLSvF8zpuosWGZPZRGaxDyZjVGcQ='
WHERE
key_id = '430fe6456119e79a85be2c4aea8cec64d6bada7f9e12516fd3685792c1a1ec33'
AND (
token = '2I9BfMCod18dUKgZLSvF8zpuosWGZPZRGaxDyZjVGcQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)