UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zsyb+5Zk0BEJ1MmvZVhcF9u9YhGcQYB9VSZD5le/ROA='
WHERE
key_id = '8d3131ad93db2dcf9ba07a93387f138cc1a8bbe943743269cc8f0dcbf9fc8f58'
AND (
token = 'Zsyb+5Zk0BEJ1MmvZVhcF9u9YhGcQYB9VSZD5le/ROA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)